package com.kxmall.rider.mapper;

import com.kxmall.rider.domain.KxRiderOrder;
import com.kxmall.rider.domain.vo.KxRiderOrderVo;
import com.kxmall.common.core.mapper.BaseMapperPlus;
import com.kxmall.rider.domain.vo.RiderStatisticalDTO;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 配送员订单信息Mapper接口
 *
 * @author kxmall
 * @date 2023-09-21
 */
public interface KxRiderOrderMapper extends BaseMapperPlus<KxRiderOrderMapper, KxRiderOrder, KxRiderOrderVo> {

    int updateRiderOrderStatus(@Param("orderNo") String orderNo, @Param("status") Integer status, @Param("updateAbnormalFlag") Boolean updateAbnormalFlag);

    List<String> selectExpireOrderNos(@Param("status") Integer status, @Param("time") Date time);

    List<String> selectRiderOrderExpireOrderNos(@Param("status") Integer status, @Param("time") Date time);

    int updateRiderOrderListStatus(@Param("orderNoList") List<String> orderNoList, @Param("status") Integer status);

    List<RiderStatisticalDTO> statisticalCount(@Param("riderId") Long riderId);

    BigDecimal selectSumIncome(@Param("riderId") Long riderId);
}
